import model.Game;
import model.Player;
import model.Pocker;
import model.Referee;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by admin
 * <p>
 * Date :2020/10/13
 * <p>
 * Description :
 * <p>
 * Version :1.0
 */
public class Application {
    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        Pocker pocker = new Pocker();
        logger.info("初始化扑克牌：{}", pocker.toString());
        logger.info("扑克牌：{}", pocker.isValid() ? "合法" : "不合法");

        pocker.shuffle();
        logger.info("洗牌：{}", pocker.toString());
        logger.info("扑克牌：{}", pocker.isValid() ? "合法" : "不合法");

        Player ermaosk = new Player(1, 100, "ermaosk");
        Player sukui = new Player(2, 100, "sukui");

        Game game = new Game(pocker);
        Referee referee = new Referee();
        game.join(ermaosk).join(sukui).referee(referee);

        try {
            game.start();
        } catch (Exception e) {
        }


    }

}
